Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-417

JexlArithmetic looses precision during arithmetic operator execution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3
    • 3.4.0
    • None

    Description

      When a an argument/variable is a BigDecimal or BigInteger, JEXL may try and convert it to double/long during arithmetic operator execution leading to unexpected results.

      See discussion

      (56.1B - 12) / 12 = 3.66666B != 3

      User intent about precision should be maintained.

      Attachments

        Activity

          People

            henrib Henri Biestro
            henrib Henri Biestro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: